messagebox "Demo [This image will be pasted onto a Neutral background 9 ways]
setxy 0 0
bitcut 50 50
rt 90
setfloodcolor [125 125 125]
setxy -250 -50
bitblock 550 150
setxy -200 0
repeat 9 [setbitmode repcount bitpaste fd 50]
messagebox "Demo [You can find out what MswLogo is up to at any time]
status
cs
pd
setpensize [1 1]
rose 150 30 [pu setx xcor + 5 pd]
messagebox "Demo [MswLogo can solve complex problems with your help]
nostatus
cs
hanoi 3
pd
messagebox "Demo [MswLogo can make all the sounds you like]
cs
repeat 50 [sound (list repcount*10 100)]
messagebox "Demo [MswLogo can even do more than one thing at a time Note that the tone you will here is a timer executing code while the picture is being drawn]
cs
settimer 1 1000 [sound [1000 40]]
penpaint
spiral 91 2 10 100
messagebox "Demo [MswLogo can even write Windows programs]
cs
cleartimer 1
win
messagebox "Demo [End of Demonstration and the Start of your imagination]
end
to rose :size :petalcount :function
make "ctr 0
do.while ~
[ ~
line :size ~
rt 360 / :petalcount ~
make "ctr :ctr + 1 ~
run :function ~
] ~
[:ctr < :petalcount]
end
to line :length
fd :length / 2
pu
bk :length
pd
fd :length / 2
end
to hanoi :number
;
; Towers of Hanoi
; Meyer A. Billmers
; November, 1983
;
; This procedure plays a graphic version of the Towers of Hanoi puzzle
; The argument is the number of disks in the configuration.
;
; c.f. putdisk, towercnt,towerset, hanoihlpr
;
local "from
local "to
local "other
local "datfil
;make "datfil openw "hanoi.dat
;fileprint :datfil (sentence [Hanoi of ] :number [towers Started at: ] time)
; to change the starting and ending needles, change the next three assignments
make "from 1
make "to 3
make "other 2
cs
ht
penpaint
setpensize [5 5]
; first we draw the table and the golden needles
setpencolor [255 0 0]
pu
setxy -350 -100
pd
setxy 350 -100
pu
setx -240
pd
fd 250
pu
setxy -15 -100
pd
fd 250
pu
setxy 210 -100
pd
fd 250
make "tower1 0
make "tower2 0
make "tower3 0
; draw the initial stack of disks. note that putdisk draws the